<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>开始使用注册</title>
    <base href="<%=basePath%>"/>
    <script src="statics/js/jquery-3.2.1.min.js"></script>
    <link rel="stylesheet" href="statics/css/layui.css"/>
    <script src="statics/layui.js"></script>
    <script type="text/javascript" src="statics/lay/modules/layer.js" ></script>
    <script src="statics/laydate/laydate.js"></script>
    <style>
        body{
            background:url(statics/images/粉色天空.jpg);
            background-repeat:no-repeat;
            background-size:100%;
        }
        .layui-form{width: 400px}
        .layui-form{position:absolute;
            top:20%;
            left:50%;
            margin:-125px 0 0 -230px;
            width:500px;
            height:600px;
            border:1px none #008800;
            background-color:transparent;}
    </style>
</head>
<body>
<form class="layui-form" action="user/register" method="post">

    <div class="layui-form-item">
        <br/>
        <h1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            注册用户</h1>
        <br/>
        <br/>
        <br/>
        <label class="layui-form-label">请输入姓名:</label>
        <div class="layui-input-inline">
            <input type="text" name="username"  placeholder="请输入姓名" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">请输入密码</label>
        <div class="layui-input-inline">
            <input type="password" name="userpwd"  placeholder="请输入密码" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-mid layui-word-aux">密码不低于6位</div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">请输入电话</label>
        <div class="layui-input-inline">
            <input type="phone" name="phone" required lay-verify="required" placeholder="请输入电话" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-mid layui-word-aux">不低于11位</div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">地址:</label>
        <div class="layui-input-inline">
            <select name="address" lay-verify="required">
                <option value=""></option>
                <option value="0">信阳</option>
                <option value="1">商丘</option>
                <option value="2">北京</option>
                <option value="3">上海</option>
                <option value="4">杭州</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">请选择身份</label>
        <div class="layui-input-block">
            <input type="checkbox" name=1 title="管理员">
            <input type="checkbox" name=2 title="开发者" checked>
        </div>
    </div>
    <!--<div class="layui-form-item">
      <label class="layui-form-label">开关</label>
      <div class="layui-input-block">
        <input type="checkbox" name="switch" lay-skin="switch">
      </div>
    </div>-->
    <div class="layui-form-item">
        <label class="layui-form-label">单选框</label>
        <div class="layui-input-block">
            <input type="radio" name="sex" value="男" title="男">
            <input type="radio" name="sex" value="女" title="女" checked>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">文本域</label>
        <div class="layui-input-inline">
            <textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" type="submit" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return true;
        });
    });
</script>
</body>
</html>

